hook GUI up to sort filter. (#342)
authortsteven4 <tsteven4@users.noreply.github.com>
Mon, 22 Apr 2019 13:17:18 +0000 (07:17 -0600)
committerGitHub <noreply@github.com>
Mon, 22 Apr 2019 13:17:18 +0000 (07:17 -0600)
because the sort filter now works on waypoints
and/or routes and/or tracks the dialog is under
the Miscellaneous menu.

gui/filterdata.cc
gui/filterdata.h
gui/filterwidgets.cc
gui/miscfltui.ui
gui/wayptsui.ui

index 5652c8fea7069464023758a8b5022098374cec1c..db987d8ba81aacc3660fa4663ceda22e45408093 100644 (file)
@@ -210,5 +210,24 @@ QStringList MiscFltFilterData::makeOptionString()
     }
     args << s;
   }
+
+  if (sortWpt_ || sortRte_ || sortTrk_) {
+    args << "-x";
+    QString s = "sort";
+    if (sortWpt_) {
+      const QStringList wptopts= {"description", "gcid", "shortname", "time"};
+      s += QString(",%1").arg(wptopts.at(sortWptBy_));
+    }
+    if (sortRte_) {
+      const QStringList rteopts= {"rtedesc", "rtename", "rtenum"};
+      s += QString(",%1").arg(rteopts.at(sortRteBy_));
+    }
+    if (sortTrk_) {
+      const QStringList trkopts= {"trkdesc", "trkname", "trknum"};
+      s += QString(",%1").arg(trkopts.at(sortTrkBy_));
+    }
+    args << s;
+    
+  }
   return args;
 }
index 5aada4ebdb423f376442e700c852e1161ca408fb..44ebe53eb8294283e407ec1587483b4e4409836c 100644 (file)
@@ -137,7 +137,7 @@ class WayPtsFilterData: public FilterData
 public:
   WayPtsFilterData(): FilterData(),
     duplicates(false), shortNames(true), locations(false),
-    position(false), radius(false), sort(false),
+    position(false), radius(false),
     positionVal(0.0), radiusVal(0.0),
     longVal(0.0), latVal(0.0),
     positionUnit(0), radiusUnit(0)
@@ -159,12 +159,11 @@ public:
     sg.addVarSetting(new BoolSetting("wpts.position", position));
     sg.addVarSetting(new DoubleSetting("wpts.positionVal", positionVal));
     sg.addVarSetting(new IntSetting("wpts.positionUnit", positionUnit));
-    sg.addVarSetting(new BoolSetting("wpts.sort", sort));
   }
 
 
 public:
-  bool duplicates, shortNames, locations, position, radius, sort;
+  bool duplicates, shortNames, locations, position, radius;
   double positionVal;
   double radiusVal;
   double longVal, latVal;
@@ -207,7 +206,13 @@ public:
     transform_(false),
     del_(false),
     swap_(false),
-    transformVal_(0)
+    sortWpt_(false),
+    sortRte_(false),
+    sortTrk_(false),
+    transformVal_(0),
+    sortWptBy_(0),
+    sortRteBy_(0),
+    sortTrkBy_(0)
   {
   }
 
@@ -222,12 +227,20 @@ public:
     sg.addVarSetting(new IntSetting("mscflt.transformVal", transformVal_));
     sg.addVarSetting(new BoolSetting("mscflt.delete", del_));
     sg.addVarSetting(new BoolSetting("mscflt.swap", swap_));
+    sg.addVarSetting(new BoolSetting("mscflt.sortWpt", sortWpt_));
+    sg.addVarSetting(new IntSetting("mscflt.sortWptBy", sortWptBy_));
+    sg.addVarSetting(new BoolSetting("mscflt.sortRte", sortRte_));
+    sg.addVarSetting(new IntSetting("mscflt.sortRteBy", sortRteBy_));
+    sg.addVarSetting(new BoolSetting("mscflt.sortTrk", sortTrk_));
+    sg.addVarSetting(new IntSetting("mscflt.sortTrkBy", sortTrkBy_));
   }
 
 public:
   bool nukeRoutes_, nukeTracks_, nukeWaypoints_;
   bool transform_, del_, swap_;
+  bool sortWpt_, sortRte_, sortTrk_;
   int transformVal_;
+  int sortWptBy_, sortRteBy_, sortTrkBy_;
 };
 
 
index 3cd78f42f27b8e73a6a93f0e7a18b778e391f399..930bbd2466d8ae0fb5a4c5a9f8985628414f4a9e 100644 (file)
@@ -174,7 +174,6 @@ WayPtsWidget::WayPtsWidget(QWidget* parent, WayPtsFilterData& wfd): FilterWidget
   fopts << new BoolFilterOption(wfd.locations, ui.locationsCheck);
   fopts << new BoolFilterOption(wfd.position, ui.positionCheck);
   fopts << new BoolFilterOption(wfd.radius, ui.radiusCheck);
-  fopts << new BoolFilterOption(wfd.sort, ui.sortCheck);
   fopts << new DoubleFilterOption(wfd.positionVal, ui.positionText, 0.0, 1.0E308);
   fopts << new DoubleFilterOption(wfd.radiusVal, ui.radiusText, 0.0, 1.0E308);
   fopts << new DoubleFilterOption(wfd.longVal, ui.longText, -180, 180, 7, 'f');
@@ -230,6 +229,9 @@ MiscFltWidget::MiscFltWidget(QWidget* parent, MiscFltFilterData& mfd): FilterWid
   ui.transformCombo->addItem(QString("%1 %2 %3").arg(tr("Waypoints")).arg(QChar(8594)).arg(tr("Tracks")));
   addCheckEnabler(ui.transformCheck,
                   QList<QWidget*>() << ui.transformCombo << ui.deleteCheck);
+  addCheckEnabler(ui.sortWptCheck, ui.sortWptBy);
+  addCheckEnabler(ui.sortRteCheck, ui.sortRteBy);
+  addCheckEnabler(ui.sortTrkCheck, ui.sortTrkBy);
 
   fopts << new BoolFilterOption(mfd.transform_, ui.transformCheck);
   fopts << new BoolFilterOption(mfd.swap_, ui.swapCheck);
@@ -237,7 +239,13 @@ MiscFltWidget::MiscFltWidget(QWidget* parent, MiscFltFilterData& mfd): FilterWid
   fopts << new BoolFilterOption(mfd.nukeTracks_, ui.nukeTracks);
   fopts << new BoolFilterOption(mfd.nukeRoutes_, ui.nukeRoutes);
   fopts << new BoolFilterOption(mfd.nukeWaypoints_, ui.nukeWaypoints);
+  fopts << new BoolFilterOption(mfd.sortWpt_, ui.sortWptCheck);
+  fopts << new BoolFilterOption(mfd.sortRte_, ui.sortRteCheck);
+  fopts << new BoolFilterOption(mfd.sortTrk_, ui.sortTrkCheck);
   fopts << new ComboFilterOption(mfd.transformVal_,  ui.transformCombo);
+  fopts << new ComboFilterOption(mfd.sortWptBy_, ui.sortWptBy);
+  fopts << new ComboFilterOption(mfd.sortRteBy_, ui.sortRteBy);
+  fopts << new ComboFilterOption(mfd.sortTrkBy_, ui.sortTrkBy);
 
   setWidgetValues();
   checkChecks();
index 996fc464194bb85d058f384efc037a8a8ed47416..d7e24d6f224770232a20b652a69cd06b01791845 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MiscFltWidget</class>
- <widget class="QWidget" name="MiscFltWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>303</width>
-    <height>175</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="font">
-      <font>
-       <pointsize>11</pointsize>
-       <weight>75</weight>
-       <bold>true</bold>
-      </font>
-     </property>
-     <property name="text">
-      <string>Misc. Filters</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>Nuke (Remove) Data Types</string>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <property name="topMargin">
-       <number>4</number>
-      </property>
-      <property name="bottomMargin">
-       <number>4</number>
-      </property>
-      <item>
-       <widget class="QCheckBox" name="nukeRoutes">
-        <property name="text">
-         <string>Routes</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="nukeTracks">
-        <property name="text">
-         <string>Tracks</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="nukeWaypoints">
-        <property name="text">
-         <string>Waypoints</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QCheckBox" name="transformCheck">
-       <property name="toolTip">
-        <string>Convert routes, waypoints and tracks to different types.</string>
-       </property>
-       <property name="whatsThis">
-        <string>This filter can be used to convert GPS data between different data types.
-
-Some GPS data formats support only some subset of waypoints, tracks, and routes. The transform filter allows you to convert between these types. For example, it can be used to convert a pile of waypoints (such as those from a CSV file) into a track or vice versa. </string>
-       </property>
-       <property name="text">
-        <string>Transform</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QComboBox" name="transformCombo">
-       <property name="toolTip">
-        <string>Type of transformation. </string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QCheckBox" name="deleteCheck">
-       <property name="toolTip">
-        <string>Delete original data after transform to prevent duplicated data. </string>
-       </property>
-       <property name="text">
-        <string>Delete</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QCheckBox" name="swapCheck">
-     <property name="toolTip">
-      <string>Swap Longitude and Latitudes for badly formatted data formats.</string>
-     </property>
-     <property name="whatsThis">
-      <string>Simple filter to swap the coordinate values (latitude and longitude) of all points. This can be helpful for wrong defined/coded data. Or if you think, you can use one of our xcsv formats, but latitude and longitude are in opposite order. </string>
-     </property>
-     <property name="text">
-      <string>Swap Coordinates</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>1</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ui version="4.0">\r
+ <class>MiscFltWidget</class>\r
+ <widget class="QWidget" name="MiscFltWidget">\r
+  <property name="geometry">\r
+   <rect>\r
+    <x>0</x>\r
+    <y>0</y>\r
+    <width>310</width>\r
+    <height>250</height>\r
+   </rect>\r
+  </property>\r
+  <property name="windowTitle">\r
+   <string>Form</string>\r
+  </property>\r
+  <layout class="QGridLayout" name="gridLayout_2">\r
+   <item row="0" column="0">\r
+    <layout class="QGridLayout" name="gridLayout">\r
+     <item row="5" column="0">\r
+      <widget class="QCheckBox" name="sortRteCheck">\r
+       <property name="text">\r
+        <string>Sort Routes</string>\r
+       </property>\r
+      </widget>\r
+     </item>\r
+     <item row="2" column="0" colspan="2">\r
+      <layout class="QHBoxLayout" name="horizontalLayout">\r
+       <item>\r
+        <widget class="QCheckBox" name="transformCheck">\r
+         <property name="toolTip">\r
+          <string>Convert routes, waypoints and tracks to different types.</string>\r
+         </property>\r
+         <property name="whatsThis">\r
+          <string>This filter can be used to convert GPS data between different data types.\r
+\r
+Some GPS data formats support only some subset of waypoints, tracks, and routes. The transform filter allows you to convert between these types. For example, it can be used to convert a pile of waypoints (such as those from a CSV file) into a track or vice versa. </string>\r
+         </property>\r
+         <property name="text">\r
+          <string>Transform</string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <widget class="QComboBox" name="transformCombo">\r
+         <property name="toolTip">\r
+          <string>Type of transformation. </string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <widget class="QCheckBox" name="deleteCheck">\r
+         <property name="toolTip">\r
+          <string>Delete original data after transform to prevent duplicated data. </string>\r
+         </property>\r
+         <property name="text">\r
+          <string>Delete</string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <spacer name="horizontalSpacer">\r
+         <property name="orientation">\r
+          <enum>Qt::Horizontal</enum>\r
+         </property>\r
+         <property name="sizeHint" stdset="0">\r
+          <size>\r
+           <width>40</width>\r
+           <height>20</height>\r
+          </size>\r
+         </property>\r
+        </spacer>\r
+       </item>\r
+      </layout>\r
+     </item>\r
+     <item row="1" column="0" colspan="2">\r
+      <widget class="QGroupBox" name="groupBox">\r
+       <property name="title">\r
+        <string>Nuke (Remove) Data Types</string>\r
+       </property>\r
+       <layout class="QHBoxLayout" name="horizontalLayout_2">\r
+        <property name="topMargin">\r
+         <number>4</number>\r
+        </property>\r
+        <property name="bottomMargin">\r
+         <number>4</number>\r
+        </property>\r
+        <item>\r
+         <widget class="QCheckBox" name="nukeRoutes">\r
+          <property name="text">\r
+           <string>Routes</string>\r
+          </property>\r
+         </widget>\r
+        </item>\r
+        <item>\r
+         <widget class="QCheckBox" name="nukeTracks">\r
+          <property name="text">\r
+           <string>Tracks</string>\r
+          </property>\r
+         </widget>\r
+        </item>\r
+        <item>\r
+         <widget class="QCheckBox" name="nukeWaypoints">\r
+          <property name="text">\r
+           <string>Waypoints</string>\r
+          </property>\r
+         </widget>\r
+        </item>\r
+       </layout>\r
+      </widget>\r
+     </item>\r
+     <item row="4" column="1">\r
+      <layout class="QHBoxLayout" name="horizontalLayout_3">\r
+       <item>\r
+        <widget class="QLabel" name="label_2">\r
+         <property name="text">\r
+          <string>By</string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <widget class="QComboBox" name="sortWptBy">\r
+         <item>\r
+          <property name="text">\r
+           <string>Description</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>GCID</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Name</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Time</string>\r
+          </property>\r
+         </item>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <spacer name="horizontalSpacer_2">\r
+         <property name="orientation">\r
+          <enum>Qt::Horizontal</enum>\r
+         </property>\r
+         <property name="sizeHint" stdset="0">\r
+          <size>\r
+           <width>40</width>\r
+           <height>20</height>\r
+          </size>\r
+         </property>\r
+        </spacer>\r
+       </item>\r
+      </layout>\r
+     </item>\r
+     <item row="4" column="0">\r
+      <widget class="QCheckBox" name="sortWptCheck">\r
+       <property name="text">\r
+        <string>Sort Waypoints</string>\r
+       </property>\r
+      </widget>\r
+     </item>\r
+     <item row="5" column="1">\r
+      <layout class="QHBoxLayout" name="horizontalLayout_4">\r
+       <item>\r
+        <widget class="QLabel" name="label_3">\r
+         <property name="text">\r
+          <string>By</string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <widget class="QComboBox" name="sortRteBy">\r
+         <item>\r
+          <property name="text">\r
+           <string>Description</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Name</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Number</string>\r
+          </property>\r
+         </item>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <spacer name="horizontalSpacer_3">\r
+         <property name="orientation">\r
+          <enum>Qt::Horizontal</enum>\r
+         </property>\r
+         <property name="sizeHint" stdset="0">\r
+          <size>\r
+           <width>40</width>\r
+           <height>20</height>\r
+          </size>\r
+         </property>\r
+        </spacer>\r
+       </item>\r
+      </layout>\r
+     </item>\r
+     <item row="3" column="0" colspan="2">\r
+      <widget class="QCheckBox" name="swapCheck">\r
+       <property name="toolTip">\r
+        <string>Swap Longitude and Latitudes for badly formatted data formats.</string>\r
+       </property>\r
+       <property name="whatsThis">\r
+        <string>Simple filter to swap the coordinate values (latitude and longitude) of all points. This can be helpful for wrong defined/coded data. Or if you think, you can use one of our xcsv formats, but latitude and longitude are in opposite order. </string>\r
+       </property>\r
+       <property name="text">\r
+        <string>Swap Coordinates</string>\r
+       </property>\r
+      </widget>\r
+     </item>\r
+     <item row="0" column="0">\r
+      <widget class="QLabel" name="label">\r
+       <property name="font">\r
+        <font>\r
+         <pointsize>11</pointsize>\r
+         <weight>75</weight>\r
+         <bold>true</bold>\r
+        </font>\r
+       </property>\r
+       <property name="text">\r
+        <string>Misc. Filters</string>\r
+       </property>\r
+      </widget>\r
+     </item>\r
+     <item row="6" column="0">\r
+      <widget class="QCheckBox" name="sortTrkCheck">\r
+       <property name="text">\r
+        <string>Sort Tracks</string>\r
+       </property>\r
+      </widget>\r
+     </item>\r
+     <item row="6" column="1">\r
+      <layout class="QHBoxLayout" name="horizontalLayout_5">\r
+       <item>\r
+        <widget class="QLabel" name="label_4">\r
+         <property name="text">\r
+          <string>By</string>\r
+         </property>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <widget class="QComboBox" name="sortTrkBy">\r
+         <item>\r
+          <property name="text">\r
+           <string>Description</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Name</string>\r
+          </property>\r
+         </item>\r
+         <item>\r
+          <property name="text">\r
+           <string>Number</string>\r
+          </property>\r
+         </item>\r
+        </widget>\r
+       </item>\r
+       <item>\r
+        <spacer name="horizontalSpacer_4">\r
+         <property name="orientation">\r
+          <enum>Qt::Horizontal</enum>\r
+         </property>\r
+         <property name="sizeHint" stdset="0">\r
+          <size>\r
+           <width>40</width>\r
+           <height>20</height>\r
+          </size>\r
+         </property>\r
+        </spacer>\r
+       </item>\r
+      </layout>\r
+     </item>\r
+    </layout>\r
+   </item>\r
+  </layout>\r
+ </widget>\r
+ <resources/>\r
+ <connections/>\r
+</ui>\r
index 51bab7ee100b02372eb1fd33951d11264e5b3471..de35ea3a1f696f3b7aa21e0ba842cd0fa0ed5a5a 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>523</width>
-    <height>195</height>
+    <width>466</width>
+    <height>173</height>
    </rect>
   </property>
   <property name="windowTitle">
   <layout class="QGridLayout" name="gridLayout_2">
    <item row="0" column="0">
     <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="0" colspan="5">
-      <widget class="QLabel" name="label">
-       <property name="font">
-        <font>
-         <pointsize>11</pointsize>
-         <weight>75</weight>
-         <bold>true</bold>
-        </font>
-       </property>
-       <property name="text">
-        <string>Waypoints Filters</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QCheckBox" name="duplicatesCheck">
-       <property name="toolTip">
-        <string>Remove duplicates</string>
-       </property>
-       <property name="whatsThis">
-        <string>The duplicate filter is designed to remove duplicate points based on their short name (traditionally a waypoint's name on the GPS receiver), and/or their location (to a precision of 6 decimals). This filter supports two options that specify how duplicates will be recognized, shortname and location. Generally, at least one of these options is required. </string>
-       </property>
-       <property name="text">
-        <string>Duplicates</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QCheckBox" name="shortNamesCheck">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="toolTip">
-        <string>Suppress duplicate waypoints based on name.</string>
-       </property>
-       <property name="whatsThis">
-        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Suppress duplicate waypoints based on name. &lt;/p&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This option is the one most often used with the duplicate filter. This option instructs the duplicate filter to remove any waypoints that share a short name with a waypoint that has come before. This option might be used to remove duplicates if you are merging two datasets that were each created in part from a common ancestor dataset. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-       </property>
-       <property name="text">
-        <string>Short Names</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="2">
-      <widget class="QCheckBox" name="locationsCheck">
+     <item row="3" column="0">
+      <widget class="QCheckBox" name="radiusCheck">
        <property name="toolTip">
-        <string>Suppress duplicate waypoint based on coords. </string>
+        <string>Include points only within radius</string>
        </property>
        <property name="whatsThis">
-        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Suppress duplicate waypoint based on coords. &lt;/p&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This option causes the duplicate filter to remove any additional waypoint that has the same coordinates (to six decimal degrees) as a waypoint that came before. This option may be used to remove duplicate waypoints if the names are not expected to be the same. It also might be used along with the &lt;span style=&quot; font-family:'Courier New,courier';&quot;&gt;shortname&lt;/span&gt; option to remove duplicate waypoints if the names of several unrelated groups of waypoints might be the same. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        <string>This filter includes or excludes waypoints based on their proximity to a central point. All waypoints more than the specified distance from the specified point will be removed from the dataset.
+
+By default, all remaining points are sorted so that points closer to the center appear earlier in the output file. </string>
        </property>
        <property name="text">
-        <string>Locations</string>
+        <string>Radius</string>
        </property>
       </widget>
      </item>
@@ -100,50 +46,69 @@ This option specifies the minimum allowable distance between two points. If two
        </property>
       </widget>
      </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="positionText">
-       <property name="maximumSize">
+     <item row="3" column="3">
+      <widget class="QLabel" name="latLabel">
+       <property name="text">
+        <string>Lat.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="4">
+      <widget class="QLineEdit" name="latText">
+       <property name="minimumSize">
         <size>
-         <width>80</width>
-         <height>16777215</height>
+         <width>110</width>
+         <height>0</height>
         </size>
        </property>
        <property name="toolTip">
-        <string>Maximum positional distance.</string>
+        <string>Latitude of the central point in decimal degrees.  South latitudes should be expressed as a negative number.</string>
        </property>
       </widget>
      </item>
-     <item row="2" column="2">
-      <widget class="QComboBox" name="positionUnitCombo">
+     <item row="3" column="2">
+      <widget class="QComboBox" name="radiusUnitCombo">
        <item>
         <property name="text">
-         <string>Feet</string>
+         <string>Miles</string>
         </property>
        </item>
        <item>
         <property name="text">
-         <string>Meters</string>
+         <string>km</string>
         </property>
        </item>
       </widget>
      </item>
-     <item row="3" column="0">
-      <widget class="QCheckBox" name="radiusCheck">
-       <property name="toolTip">
-        <string>Include points only within radius</string>
-       </property>
-       <property name="whatsThis">
-        <string>This filter includes or excludes waypoints based on their proximity to a central point. All waypoints more than the specified distance from the specified point will be removed from the dataset.
-
-By default, all remaining points are sorted so that points closer to the center appear earlier in the output file. </string>
+     <item row="0" column="0" colspan="5">
+      <widget class="QLabel" name="label">
+       <property name="font">
+        <font>
+         <pointsize>11</pointsize>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
        </property>
        <property name="text">
-        <string>Radius</string>
+        <string>Waypoints Filters</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="1">
-      <widget class="QLineEdit" name="radiusText">
+     <item row="4" column="4">
+      <widget class="QLineEdit" name="longText">
+       <property name="minimumSize">
+        <size>
+         <width>110</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="toolTip">
+        <string>Longitude of the central point in decimal degrees. West longitudes should be expressed as a negative number.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QLineEdit" name="positionText">
        <property name="maximumSize">
         <size>
          <width>80</width>
@@ -151,74 +116,96 @@ By default, all remaining points are sorted so that points closer to the center
         </size>
        </property>
        <property name="toolTip">
-        <string>Maximum distance from center. </string>
+        <string>Maximum positional distance.</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="2">
-      <widget class="QComboBox" name="radiusUnitCombo">
+     <item row="4" column="3">
+      <widget class="QLabel" name="longLabel">
+       <property name="text">
+        <string>Long.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="2">
+      <widget class="QCheckBox" name="locationsCheck">
+       <property name="toolTip">
+        <string>Suppress duplicate waypoint based on coords. </string>
+       </property>
+       <property name="whatsThis">
+        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Suppress duplicate waypoint based on coords. &lt;/p&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This option causes the duplicate filter to remove any additional waypoint that has the same coordinates (to six decimal degrees) as a waypoint that came before. This option may be used to remove duplicate waypoints if the names are not expected to be the same. It also might be used along with the &lt;span style=&quot; font-family:'Courier New,courier';&quot;&gt;shortname&lt;/span&gt; option to remove duplicate waypoints if the names of several unrelated groups of waypoints might be the same. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       </property>
+       <property name="text">
+        <string>Locations</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="2">
+      <widget class="QComboBox" name="positionUnitCombo">
        <item>
         <property name="text">
-         <string>Miles</string>
+         <string>Feet</string>
         </property>
        </item>
        <item>
         <property name="text">
-         <string>km</string>
+         <string>Meters</string>
         </property>
        </item>
       </widget>
      </item>
-     <item row="3" column="3">
-      <widget class="QLabel" name="latLabel">
+     <item row="1" column="0">
+      <widget class="QCheckBox" name="duplicatesCheck">
+       <property name="toolTip">
+        <string>Remove duplicates</string>
+       </property>
+       <property name="whatsThis">
+        <string>The duplicate filter is designed to remove duplicate points based on their short name (traditionally a waypoint's name on the GPS receiver), and/or their location (to a precision of 6 decimals). This filter supports two options that specify how duplicates will be recognized, shortname and location. Generally, at least one of these options is required. </string>
+       </property>
        <property name="text">
-        <string>Lat.</string>
+        <string>Duplicates</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="4">
-      <widget class="QLineEdit" name="latText">
-       <property name="minimumSize">
-        <size>
-         <width>110</width>
-         <height>0</height>
-        </size>
+     <item row="1" column="1">
+      <widget class="QCheckBox" name="shortNamesCheck">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
        </property>
        <property name="toolTip">
-        <string>Latitude of the central point in decimal degrees.  South latitudes should be expressed as a negative number.</string>
+        <string>Suppress duplicate waypoints based on name.</string>
+       </property>
+       <property name="whatsThis">
+        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Suppress duplicate waypoints based on name. &lt;/p&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This option is the one most often used with the duplicate filter. This option instructs the duplicate filter to remove any waypoints that share a short name with a waypoint that has come before. This option might be used to remove duplicates if you are merging two datasets that were each created in part from a common ancestor dataset. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
        </property>
-      </widget>
-     </item>
-     <item row="4" column="3">
-      <widget class="QLabel" name="longLabel">
        <property name="text">
-        <string>Long.</string>
+        <string>Short Names</string>
        </property>
       </widget>
      </item>
-     <item row="4" column="4">
-      <widget class="QLineEdit" name="longText">
-       <property name="minimumSize">
+     <item row="3" column="1">
+      <widget class="QLineEdit" name="radiusText">
+       <property name="maximumSize">
         <size>
-         <width>110</width>
-         <height>0</height>
+         <width>80</width>
+         <height>16777215</height>
         </size>
        </property>
        <property name="toolTip">
-        <string>Longitude of the central point in decimal degrees. West longitudes should be expressed as a negative number.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="0">
-      <widget class="QCheckBox" name="sortCheck">
-       <property name="toolTip">
-        <string>This filter sorts waypoints into alphabetical order</string>
-       </property>
-       <property name="whatsThis">
-        <string>This filter sorts waypoints into alphabetical order</string>
-       </property>
-       <property name="text">
-        <string>Sort</string>
+        <string>Maximum distance from center. </string>
        </property>
       </widget>
      </item>